package ru.amse.tsyganov.jumleditor.view;

import java.util.List;

import org.eclipse.swt.graphics.GC;

import ru.amse.tsyganov.jumleditor.model.Partition;
import ru.amse.tsyganov.jumleditor.model.State;

public class PartitionView<T extends Partition> extends ViewElement<T> {
	
	/*package*/ PartitionView(T model) {
		setModel(model);
	}

	@Override
	public void paint(GC gc) {
		for (State s : getModel().getContents()) {
			StateView<? extends State> stateView = 
				ModelViewMap.map.getStatesMap().get(s);
			stateView.paint(gc);
		}
	}

	@Override
	public void accept(Visitor v) {
		v.visitPartitionView(this);
		for (State s : getModel().getContents()) {
			StateView<? extends State> stateView = 
				ModelViewMap.map.getStatesMap().get(s);
			stateView.accept(v);
		}
	}

	@Override
	public List<? extends ActivePoint> getActivePoints() {
		// TODO Auto-generated method stub
		return null;
	}
}
